// 导入action type常量
import {GET_MESSAGE,ADD_MESSAGE,DEL_MESSAGE,GET_MESSAGE_ASYNC} from './action-types';
export const get_message=(data)=>({type:GET_MESSAGE,data});
export const add_message=(data)=>({type:ADD_MESSAGE,data});
export const del_message=(data)=>({type:DEL_MESSAGE,data});


// 异步action, watcher saga中需要监听, 从而触发对应的同步action
export const get_message_async=()=>{
    return {type:GET_MESSAGE_ASYNC}
}